home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2906 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.4 KB

  1. Path: news1.h1.usa.pipeline.com!usenet
  2. From: grantp@usa.pipeline.com(Pete)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: bc4.0, Windows, Cursor
  5. Date: 20 Jan 1996 11:12:52 GMT
  6. Organization: Kalevi, Inc.
  7. Message-ID: <4dqink$sge@news1.usa.pipeline.com>
  8. References: <4dpiba$gij@oxy.rust.net>
  9. NNTP-Posting-Host: pipe7.h1.usa.pipeline.com
  10. X-PipeUser: grantp
  11. X-PipeHub: usa.pipeline.com
  12. X-PipeGCOS: (Pete)
  13. X-Newsreader: Pipeline USA v3.3.0
  14.  
  15. On Jan 20, 1996 05:00:33 in article <Re: bc4.0, Windows, Cursor>,
  16. 'ebennett@rust.net' wrote: 
  17.  
  18.  
  19. >slane@interlink.net (Simon Lane) wrote: 
  20. >>Using SetCursor() to change the cursor from IDC_ARROW to IDC_WAIT works  
  21. >>until the user actually moves the cursor.  How do you change the cursor  
  22. >>for the entire desktop, or at the least for the current active window  
  23. >>and make sure that it does not change back ? 
  24. >>Thanks in advance, slane@interlink.net 
  25. >Process the WM_MOUSEMOVE message and call SetCursor() every time you 
  26. >receive that message. 
  27. Another (and often a better) way is to capture the mouse, 
  28. something like: 
  29.  
  30. WARNING Untested code using WinAPI -- OWL and MFC have 
  31. equivalent methods. 
  32.  
  33.   ::SetCursor(hWnd, IDC_WAIT); 
  34.   ::SetCapture(hWnd); 
  35.   ..... do your stufffff 
  36.   ::ReleaseCapture(); 
  37.  
  38.  
  39. Of course, ReleaseCapture can be in a message response function 
  40. so that you can process other windows messages while the 
  41. hourglass remains in effect. 
  42.  
  43. -- 
  44. Pete Grant 
  45. Kalevi, Inc. 
  46. Object Oriented Software Development
  47.